package chapter09plus

/**
 * Created with IntelliJ IDEA.
 * ClassName: Test01_Exception
 * Package: chapter09plus
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 *          Date: 2023-07-01
 *          Time: 11:39
 */

object Test01_Exception {
  def main(args: Array[String]): Unit = {

    try{
      val n = 10 / 0

    }catch {
      case e : ArithmeticException =>{
        println("算数异常")
      }
      case e : Exception =>{
        println("一般异常")
      }
        //finally一定会执行
    }finally {
      println("处理结束")
    }


  }
}
